<!DOCTYPE html>
<html>
<body>
<div id="t"></div>
<textarea id="tpl">
    {{#list x['sdsd'].sd as x}}
    11
    {{/list}}
</textarea>
<script src="regularjs/dist/regular.js"></script>
<script>
    //    {{#if !!x}}
    //    <div>
    //    <p class="11">{{x.list[0]}}</p>
    //    </div>
    //    {{#elseif x = 1}}
    //    2
    //    {{#else}}
    //    3
    //    {{/if}}
    var t = Regular.extend({
        template: document.getElementById('tpl').value,
        init: function () {
            this.data.t = 2;
//            this.$update();
        },
        test: function () {
            console.log(1);
        }
    });

    var t1 = new t({data: {t: 1, x: {list: [1, 2, 3, 4, 5]}}}).$inject('#t');
</script>
</body>
</html>
